const path = require('path')
const artTemplate = require('art-template')
let path1 = path.join(__dirname, 'template.art')
console.log('path1', path1);
// 第一种写法
/* let html=artTemplate(path1,{
    data:{
        name:'carlos',
        age:25
    }
}) */
//这种写法也可以的哦
let html = artTemplate(path1, {
    // name: '<h1>carlos</h1>',
    name: '<h1>carlos</h1>',
    age: 5,
    people:[{
        name:'carlos',
        age:25,
        index:0
    },{
        name:'kawaii',
        age:25,
        index:1
    },]
})
console.log(html);